import type { AppRouteModule } from '/@/router/types';
import { RoleEnum } from '/@/enums/roleEnum';
import { LAYOUT } from '/@/router/constant';
import { t } from '/@/hooks/web/useI18n';

const charts: AppRouteModule = {
  path: '/marketing_tool',
  name: 'Larketing_tool',
  component: LAYOUT,
  redirect: '/marketing_tool/ActivityIncome',
  meta: {
    orderNo: 60,
    icon: 'ant-design:reddit-circle-filled',
    title: t('routes.demo.marketing_tool.Title'),
    roles: [RoleEnum.ADMIN, RoleEnum.OTHER, RoleEnum.MERCHANT],
  },
  children: [
    {
      path: 'logOperation',
      name: 'LogOperation',
      meta: {
        title: t('routes.demo.marketing_tool.ActivityIncome'),
        roles: [RoleEnum.ADMIN, RoleEnum.OTHER, RoleEnum.MERCHANT],
      },
      component: () => import('/@/views/locality/marketing_tool/ActivityIncome.vue'),
    },
    {
      path: 'balanceRecharge',
      name: 'BalanceRecharge',
      meta: {
        title: t('routes.demo.marketing_tool.BalanceRecharge'),
        roles: [RoleEnum.ADMIN, RoleEnum.OTHER, RoleEnum.MERCHANT],
      },
      component: () => import('/@/views/locality/marketing_tool/BalanceRecharge.vue'),
    },
    {
      path: 'card',
      name: 'Card',
      meta: {
        title: t('routes.demo.marketing_tool.Card'),
        roles: [RoleEnum.ADMIN, RoleEnum.OTHER, RoleEnum.MERCHANT],
      },
      component: () => import('/@/views/locality/marketing_tool/Card.vue'),
    },
    {
      path: 'creditsExchange',
      name: 'CreditsExchange',
      meta: {
        title: t('routes.demo.marketing_tool.CreditsExchange'),
        roles: [RoleEnum.ADMIN, RoleEnum.OTHER, RoleEnum.MERCHANT],
      },
      component: () => import('/@/views/locality/marketing_tool/CreditsExchange.vue'),
    },
    {
      path: 'discountPackage',
      name: 'DiscountPackage',
      meta: {
        title: t('routes.demo.marketing_tool.DiscountPackage'),
        roles: [RoleEnum.ADMIN, RoleEnum.OTHER, RoleEnum.MERCHANT],
      },
      component: () => import('/@/views/locality/marketing_tool/DiscountPackage.vue'),
    },
    {
      path: 'draw',
      name: 'Draw',
      meta: {
        title: t('routes.demo.marketing_tool.draw'),
        roles: [RoleEnum.ADMIN, RoleEnum.OTHER, RoleEnum.MERCHANT],
      },
      component: () => import('/@/views/locality/marketing_tool/draw.vue'),
    },
    {
      path: 'memberRecharge',
      name: 'MemberRecharge',
      meta: {
        title: t('routes.demo.marketing_tool.MemberRecharge'),
        roles: [RoleEnum.ADMIN, RoleEnum.OTHER, RoleEnum.MERCHANT],
      },
      component: () => import('/@/views/locality/marketing_tool/MemberRecharge.vue'),
    },
    {
      path: 'scenery',
      name: 'Scenery',
      meta: {
        title: t('routes.demo.marketing_tool.scenery'),
        roles: [RoleEnum.ADMIN, RoleEnum.OTHER, RoleEnum.MERCHANT],
      },
      component: () => import('/@/views/locality/marketing_tool/scenery.vue'),
    },
  ],
};

export default charts;
